{% load i18n %}
	<script type="text/javascript">
<!--
function loopMovie()
{
	var movieURL = $('#movieURL').attr('value');
	if (!movieURL || '' == movieURL) {
		alert('{% trans "Please input YouTube movie URL!" %}');
		return false;
	}
	var movieID = checkYouTubeURL(movieURL); 
	if (null == movieID) {
		alert('{% trans "Please input valid YouTube movie URL!" %}');
		return false;
	}

	if ($('#noshare').attr('checked')) {
		ns = 'ns/';
		setCookie('noshare', true);
	} else {
		ns = '';
		setCookie('noshare', null);
	}
	document.location.href= 'http://{{ siteHostname }}/loop/'+ns+'youtube/' + movieID;
	return true;
}

$(function(){
	if ($.cookie('noshare')) {
		$('#noshare').attr('checked', 'true');
	}
});
-->
	</script>
	